/*
   Copyright 2011-2012 gtalent2@gmail.com

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
package entity

import (
	"../models"
	"github.com/gtalent/starfish/gfx"
)

type CreatureClass struct {
	Name          string
	Successor     *CreatureClass
	Predecessor   *CreatureClass
	Types         []CreatureType
	CanLearn      []models.CreatureMove
	LearnsAtLevel map[int]models.CreatureMove
	FrontView     *gfx.Animation
	BackView      *gfx.Animation
}

type CreatureType struct {
	Name          string
	Special       bool
	StrongAgainst []string
	WeakAgainst   []string
}

type CreatureMove struct {
	Name     string
	PP       models.Fraction
	Type     CreatureType
	Special  bool
	Power    int
	Script   string
	Burn     models.StatusEffect
	Freeze   models.StatusEffect
	Paralyze models.StatusEffect
	Poison   models.StatusEffect
	Sleep    models.StatusEffect
}

type Creature struct {
	*CreatureClass
	ID          uint64
	Name        string
	Male        bool
	Level       int
	Health      models.Fraction
	Attack      int
	SpecAttack  int
	Defense     int
	SpecDefense int
	Speed       int
	Burned      bool
	Frozen      bool
	Poisoned    bool
	Asleep      bool
	Moves       [4]CreatureMove
}
